package initialize

import (
	"coolcar/global"
	"coolcar/srvs/auth_srv/dao"
	"coolcar/srvs/auth_srv/handler"
	profile2 "coolcar/srvs/rental_srv/dao/profile"
	trip2 "coolcar/srvs/rental_srv/dao/trip"
	"coolcar/srvs/rental_srv/handler/profile"
	"coolcar/srvs/rental_srv/handler/trip"

	"go.uber.org/zap"
)

func InitAuthHandler(logger *zap.Logger) {
	m := dao.NewMongo(global.MongoDB)

	global.AuthHandler = &handler.Service{
		Mongo:  m,
		Logger: logger,
	}
}

func InitRentalHandler(logger *zap.Logger) {
	m := trip2.NewMongo(global.MongoDB)
	global.RentalHandler = &trip.Service{
		Mongo:  m,
		Logger: logger,
	}
}

func InitProfileHandler(logger *zap.Logger) {
	m := profile2.NewMongo(global.MongoDB)
	global.ProfileHandler = &profile.Service{
		Mongo:  m,
		Logger: logger,
	}
}
